projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e1ae36
)
cssvalue: Don't crash when printing NULL strings
author
Benjamin Otte
<otte@redhat.com>
Thu, 27 Sep 2012 14:23:53 +0000
(16:23 +0200)
committer
Benjamin Otte
<otte@redhat.com>
Fri, 28 Sep 2012 16:27:49 +0000
(18:27 +0200)
A NULL string should be printed as "none".
gtk/gtkcssstringvalue.c
patch
|
blob
|
history
diff --git
a/gtk/gtkcssstringvalue.c
b/gtk/gtkcssstringvalue.c
index 9edda646c9cfd04fdec21b34ebdaf5f89d746d45..02405f4106f1cf1f23b64df25ae3bca230d6e709 100644
(file)
--- a/
gtk/gtkcssstringvalue.c
+++ b/
gtk/gtkcssstringvalue.c
@@
-65,6
+65,12
@@
gtk_css_value_string_print (const GtkCssValue *value,
char *string = value->string;
gsize len;
+ if (string == NULL)
+ {
+ g_string_append (str, "none");
+ return;
+ }
+
g_string_append_c (str, '"');
do {